Optimal. Leaf size=142 \[ \frac {x}{(a+b)^3}+\frac {\sqrt {b} \left (15 a^2+10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{5/2} (a+b)^3 d}+\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3742, 425, 541,
536, 212, 211} \begin {gather*} \frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 d (a+b)^2 \left (a+b \tanh ^2(c+d x)\right )}+\frac {\sqrt {b} \left (15 a^2+10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{5/2} d (a+b)^3}+\frac {b \tanh (c+d x)}{4 a d (a+b) \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {x}{(a+b)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 212
Rule 425
Rule 536
Rule 541
Rule 3742
Rubi steps
\begin {align*} \int \frac {1}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (a+b x^2\right )^3} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}-\frac {\text {Subst}\left (\int \frac {b-4 (a+b)+3 b x^2}{\left (1-x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tanh (c+d x)\right )}{4 a (a+b) d}\\ &=\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {8 a^2+7 a b+3 b^2-b (7 a+3 b) x^2}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{8 a^2 (a+b)^2 d}\\ &=\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (c+d x)\right )}{(a+b)^3 d}+\frac {\left (b \left (15 a^2+10 a b+3 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tanh (c+d x)\right )}{8 a^2 (a+b)^3 d}\\ &=\frac {x}{(a+b)^3}+\frac {\sqrt {b} \left (15 a^2+10 a b+3 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{8 a^{5/2} (a+b)^3 d}+\frac {b \tanh (c+d x)}{4 a (a+b) d \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (7 a+3 b) \tanh (c+d x)}{8 a^2 (a+b)^2 d \left (a+b \tanh ^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.24, size = 147, normalized size = 1.04 \begin {gather*} \frac {\frac {\sqrt {b} \left (15 a^2+10 a b+3 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{5/2}}-4 \log (1-\tanh (c+d x))+4 \log (1+\tanh (c+d x))+\frac {2 b (a+b)^2 \tanh (c+d x)}{a \left (a+b \tanh ^2(c+d x)\right )^2}+\frac {b (a+b) (7 a+3 b) \tanh (c+d x)}{a^2 \left (a+b \tanh ^2(c+d x)\right )}}{8 (a+b)^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.27, size = 156, normalized size = 1.10
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (1+\tanh \left (d x +c \right )\right )}{2 \left (a +b \right )^{3}}+\frac {b \left (\frac {\frac {b \left (7 a^{2}+10 a b +3 b^{2}\right ) \left (\tanh ^{3}\left (d x +c \right )\right )}{8 a^{2}}+\frac {\left (9 a^{2}+14 a b +5 b^{2}\right ) \tanh \left (d x +c \right )}{8 a}}{\left (a +b \left (\tanh ^{2}\left (d x +c \right )\right )\right )^{2}}+\frac {\left (15 a^{2}+10 a b +3 b^{2}\right ) \arctan \left (\frac {b \tanh \left (d x +c \right )}{\sqrt {a b}}\right )}{8 a^{2} \sqrt {a b}}\right )}{\left (a +b \right )^{3}}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}}{d}\) | \(156\) |
default | \(\frac {\frac {\ln \left (1+\tanh \left (d x +c \right )\right )}{2 \left (a +b \right )^{3}}+\frac {b \left (\frac {\frac {b \left (7 a^{2}+10 a b +3 b^{2}\right ) \left (\tanh ^{3}\left (d x +c \right )\right )}{8 a^{2}}+\frac {\left (9 a^{2}+14 a b +5 b^{2}\right ) \tanh \left (d x +c \right )}{8 a}}{\left (a +b \left (\tanh ^{2}\left (d x +c \right )\right )\right )^{2}}+\frac {\left (15 a^{2}+10 a b +3 b^{2}\right ) \arctan \left (\frac {b \tanh \left (d x +c \right )}{\sqrt {a b}}\right )}{8 a^{2} \sqrt {a b}}\right )}{\left (a +b \right )^{3}}-\frac {\ln \left (\tanh \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{3}}}{d}\) | \(156\) |
risch | \(\frac {x}{a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}}-\frac {\left (9 a^{3} {\mathrm e}^{6 d x +6 c}-a^{2} b \,{\mathrm e}^{6 d x +6 c}-13 a \,b^{2} {\mathrm e}^{6 d x +6 c}-3 b^{3} {\mathrm e}^{6 d x +6 c}+27 a^{3} {\mathrm e}^{4 d x +4 c}-9 a^{2} b \,{\mathrm e}^{4 d x +4 c}+21 a \,b^{2} {\mathrm e}^{4 d x +4 c}+9 b^{3} {\mathrm e}^{4 d x +4 c}+27 a^{3} {\mathrm e}^{2 d x +2 c}+13 a^{2} b \,{\mathrm e}^{2 d x +2 c}-23 a \,b^{2} {\mathrm e}^{2 d x +2 c}-9 b^{3} {\mathrm e}^{2 d x +2 c}+9 a^{3}+21 a^{2} b +15 a \,b^{2}+3 b^{3}\right ) b}{4 \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}+2 a \,{\mathrm e}^{2 d x +2 c}-2 b \,{\mathrm e}^{2 d x +2 c}+a +b \right )^{2} \left (a +b \right )^{3} a^{2} d}+\frac {15 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {-a b}-b}{a +b}\right )}{16 a \left (a +b \right )^{3} d}+\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {-a b}-b}{a +b}\right ) b}{8 a^{2} \left (a +b \right )^{3} d}+\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a +2 \sqrt {-a b}-b}{a +b}\right ) b^{2}}{16 a^{3} \left (a +b \right )^{3} d}-\frac {15 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right )}{16 a \left (a +b \right )^{3} d}-\frac {5 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right ) b}{8 a^{2} \left (a +b \right )^{3} d}-\frac {3 \sqrt {-a b}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {-a b}-a +b}{a +b}\right ) b^{2}}{16 a^{3} \left (a +b \right )^{3} d}\) | \(592\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 507 vs.
\(2 (128) = 256\).
time = 0.60, size = 507, normalized size = 3.57 \begin {gather*} -\frac {{\left (15 \, a^{2} b + 10 \, a b^{2} + 3 \, b^{3}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{8 \, {\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} \sqrt {a b} d} + \frac {9 \, a^{3} b + 21 \, a^{2} b^{2} + 15 \, a b^{3} + 3 \, b^{4} + {\left (27 \, a^{3} b + 13 \, a^{2} b^{2} - 23 \, a b^{3} - 9 \, b^{4}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + 3 \, {\left (9 \, a^{3} b - 3 \, a^{2} b^{2} + 7 \, a b^{3} + 3 \, b^{4}\right )} e^{\left (-4 \, d x - 4 \, c\right )} + {\left (9 \, a^{3} b - a^{2} b^{2} - 13 \, a b^{3} - 3 \, b^{4}\right )} e^{\left (-6 \, d x - 6 \, c\right )}}{4 \, {\left (a^{7} + 5 \, a^{6} b + 10 \, a^{5} b^{2} + 10 \, a^{4} b^{3} + 5 \, a^{3} b^{4} + a^{2} b^{5} + 4 \, {\left (a^{7} + 3 \, a^{6} b + 2 \, a^{5} b^{2} - 2 \, a^{4} b^{3} - 3 \, a^{3} b^{4} - a^{2} b^{5}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + 2 \, {\left (3 \, a^{7} + 7 \, a^{6} b + 6 \, a^{5} b^{2} + 6 \, a^{4} b^{3} + 7 \, a^{3} b^{4} + 3 \, a^{2} b^{5}\right )} e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, {\left (a^{7} + 3 \, a^{6} b + 2 \, a^{5} b^{2} - 2 \, a^{4} b^{3} - 3 \, a^{3} b^{4} - a^{2} b^{5}\right )} e^{\left (-6 \, d x - 6 \, c\right )} + {\left (a^{7} + 5 \, a^{6} b + 10 \, a^{5} b^{2} + 10 \, a^{4} b^{3} + 5 \, a^{3} b^{4} + a^{2} b^{5}\right )} e^{\left (-8 \, d x - 8 \, c\right )}\right )} d} + \frac {d x + c}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 3587 vs.
\(2 (128) = 256\).
time = 0.45, size = 7496, normalized size = 52.79 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 409 vs.
\(2 (128) = 256\).
time = 0.45, size = 409, normalized size = 2.88 \begin {gather*} \frac {\frac {{\left (15 \, a^{2} b + 10 \, a b^{2} + 3 \, b^{3}\right )} \arctan \left (\frac {a e^{\left (2 \, d x + 2 \, c\right )} + b e^{\left (2 \, d x + 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{{\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} \sqrt {a b}} + \frac {8 \, {\left (d x + c\right )}}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left (9 \, a^{3} b e^{\left (6 \, d x + 6 \, c\right )} - a^{2} b^{2} e^{\left (6 \, d x + 6 \, c\right )} - 13 \, a b^{3} e^{\left (6 \, d x + 6 \, c\right )} - 3 \, b^{4} e^{\left (6 \, d x + 6 \, c\right )} + 27 \, a^{3} b e^{\left (4 \, d x + 4 \, c\right )} - 9 \, a^{2} b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 21 \, a b^{3} e^{\left (4 \, d x + 4 \, c\right )} + 9 \, b^{4} e^{\left (4 \, d x + 4 \, c\right )} + 27 \, a^{3} b e^{\left (2 \, d x + 2 \, c\right )} + 13 \, a^{2} b^{2} e^{\left (2 \, d x + 2 \, c\right )} - 23 \, a b^{3} e^{\left (2 \, d x + 2 \, c\right )} - 9 \, b^{4} e^{\left (2 \, d x + 2 \, c\right )} + 9 \, a^{3} b + 21 \, a^{2} b^{2} + 15 \, a b^{3} + 3 \, b^{4}\right )}}{{\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} {\left (a e^{\left (4 \, d x + 4 \, c\right )} + b e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}^{2}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.90, size = 260, normalized size = 1.83 \begin {gather*} \frac {\ln \left (\mathrm {tanh}\left (c+d\,x\right )+1\right )}{2\,d\,a^3+6\,d\,a^2\,b+6\,d\,a\,b^2+2\,d\,b^3}-\frac {\ln \left (1-\mathrm {tanh}\left (c+d\,x\right )\right )}{2\,d\,a^3+6\,d\,a^2\,b+6\,d\,a\,b^2+2\,d\,b^3}+\frac {\frac {{\mathrm {tanh}\left (c+d\,x\right )}^3\,\left (\frac {3\,b^3}{8}+\frac {7\,a\,b^2}{8}\right )}{a^2\,d\,\left (a^2+2\,a\,b+b^2\right )}+\frac {\mathrm {tanh}\left (c+d\,x\right )\,\left (5\,b^2+9\,a\,b\right )}{8\,a\,d\,\left (a^2+2\,a\,b+b^2\right )}}{a^2+2\,a\,b\,{\mathrm {tanh}\left (c+d\,x\right )}^2+b^2\,{\mathrm {tanh}\left (c+d\,x\right )}^4}+\frac {\mathrm {atan}\left (\frac {b\,\mathrm {tanh}\left (c+d\,x\right )}{\sqrt {a\,b}}\right )\,\left (15\,a^2\,b+10\,a\,b^2+3\,b^3\right )}{\sqrt {a\,b}\,\left (8\,a^5\,d+a\,b\,\left (24\,a^3\,d+a\,b\,\left (24\,a\,d+8\,b\,d\right )\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________